package com.woniuxy.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.DateFormat;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.util.Date;

@Document(indexName = "movie")
@Data
@AllArgsConstructor
@NoArgsConstructor
public class MovieElasticDemo {
    @Id
    private String id;

    private String movieName;

    private String type;

    private String status;

    @Field(type = FieldType.Date,format = DateFormat.date_optional_time)
    private Date startTime;
}
